package com.heima.behavior.controller;

import com.heima.behavior.dto.BehaviorDto;
import com.heima.behavior.service.IApBehaviorService;
import com.heima.common.dto.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/api/v1/behavior")
public class ApBehaviorController {

    @Autowired
    private IApBehaviorService apBehaviorService;

    /**
     * 加载当前登录用户对该批文章的行为
     *
     * @return {@link ResponseResult}
     */
    @PostMapping("/load_article_behavior")
    public ResponseResult loadArticleBehavior(@RequestBody BehaviorDto dto) {
        return apBehaviorService.loadArticleBehavior(dto);
    }


}
